﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PetaPoco;

namespace BrnMall.Manager.Domain.WeApp
{
    [TableName("weapp_application")]
    [PrimaryKey("appid")]
    public class WeApplication
    {
        public int AppId { get; set; }
        public string Name { get; set; }
        public string Logo { get; set; }
        public string Summary { get; set; }
        public int TemplateId { get; set; }
        /// <summary>
        /// 原始小程序TabBar配置
        /// </summary>
        public string RawTabBar { get; set; }
        /// <summary>
        /// 原始小程序页面配置
        /// </summary>
        public string RawPages { get; set; }

        public WeApplication()
        {
            RawTabBar = RawPages=string.Empty;
        }
    }
    /// <summary>
    /// 第三方平台
    /// </summary>
    [TableName("weapp_platform")]
    public class ApplicationPlatform
    {
        /// <summary>
        /// 
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 平台名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string AppId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string AppSecret { get; set; }
        /// <summary>
        /// 公众号消息校验Token
        /// </summary>
        public string Token { get; set; }
        /// <summary>
        /// 公众号消息加解密Key

        /// </summary>
        public string AESKey { get; set; }
        /// <summary>
        /// 预授权码
        /// </summary>
        public string Pre_Auth_Code { get; set; }
        /// <summary>
        /// 预授权码过期时间
        /// </summary>
        public DateTime Pre_Expires_In { get; set; }
        /// <summary>
        /// 微信服务器提供的Ticket
        /// </summary>

        public string ComponentVerifyTicket { get; set; }
        /// <summary>
        /// 微信服务器提供的Ticket更新时间
        /// </summary>
        public DateTime VerifyTicketTime { get; set; }

        /// <summary>
        /// 获取预授权码的令牌
        /// </summary>
        public string Component_Access_Token { get; set; }
        /// <summary>
        /// 令牌过期时间
        /// </summary>
        public DateTime Component_Expires_In { get; set; }
    }
}
